/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef __JoystickCtrlMainWindowMainFrame__
#define __JoystickCtrlMainWindowMainFrame__

/**
@file
Subclass of MainFrame, which is generated by wxFormBuilder.
*/

// Custom events.
/*BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(MY_EVENT_REFRESHEVENTLIST, -1)
END_DECLARE_EVENT_TYPES();*/

#include "JoystickCtrlMainWindow.h"
#include "Component.hpp"
#include "JoystickControl.h"

/** Implementing MainFrame */
class JoystickCtrlMainWindowMainFrame : public MainFrame,
                                        public Gimbo::CComponent
{
  DECLARE_EVENT_TABLE();
 public:
  /** Constructor */
  JoystickCtrlMainWindowMainFrame( wxWindow* parent );

  /** Init */
  bool Initialize(gimi::GIMI *aGimiPtr, int aGimboID, int aReportID);
  void Deinitialize(void);

 protected:
  void OnRefreshTargetServices(wxCommandEvent &aEvent);
  void OnServiceAssignment(const Gimbo::TServiceAssignmentList &aServiceList);  
  void OnGimboDetach(void);
  
 private:
  Gimbo::TServiceAssignmentList iServiceList;
  bool iServiceListUpdated;
  gimi::GIMI *iGIMIPtr;
  JoystickControl *iJoystickControl;

};

#endif // __JoystickCtrlMainWindowMainFrame__
